package com.saint.swipemenulistview.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import org.xutils.x;

/**
 * Created by Administrator on 2017/11/3.
 */

public abstract class BaseActivity extends AppCompatActivity {
    protected Activity act;
    protected Intent intent;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(setContent());
        act = this;
        x.view().inject(this);
        initView();
        initDate();
    }

    /**
     * 设置内容布局
     */
    protected abstract int setContent();


    /**
     * 初始化控件
     */
    protected abstract void initView();

    /**
     * 加载数据
     */
    protected abstract void initDate();

    /**
     * 启动目标Activity
     * @param startAct 当前Activity
     */
    protected abstract void startAct(Activity startAct);


}
